cmake_minimum_required(VERSION 3.10)

project(app)

include_directories(/usr/local/include/vtk-9.4)
include_directories(${CMAKE_CURRENT_LIST_DIR}/include)

find_package(VTK COMPONENTS 
vtkInteractionImage  # vtkImageViewer2 所在的模块
    vtkIOImage          # 图像读取（如 vtkPNGReader）
    vtkRenderingCore    # 基本渲染
    vtkInteractionStyle # 交互支持
    vtkRenderingOpenGL2 # OpenGL 后端（GUI 必需）

vtkFiltersSources 
vtkRenderingGL2PSOpenGL2  
vtkRenderingOpenGL2 
vtkCommonDataModel 
vtkCommonCore 
vtkRenderingCore
vtkInteractionStyle
vtkImagingCore
vtkRenderingOpenGL2
vtkInteractionStyle
vtkRenderingFreeType
vtkIOLegacy
vtkIOImage
QUIET
)

if(VTK_FOUND)
    message(STATUS "found vtk_DIR")
else(VTK_FOUND)
    message()
endif(VTK_FOUND)


aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/src SRC_LIST)



add_executable(app main.cpp ${SRC_LIST})
target_link_libraries(app ${VTK_LIBRARIES})


#lvtkCommonCore -lvtkCommonDataModel -lvtkRenderingCore -lvtkRenderingOpenGL2  